import request from '@/utils/request'

// 查询列表
export function orderList(query) {
  return request({
    url: '/order/list',
    method: 'post',
    params: query
  })
}
//删除订单
export function orderRemove(ids) {
  return request({
    url: '/order/remove',
    method: 'post',
    data: ids
  })
}

//订单保存
export function orderSave(data) {
  return request({
    url: '/order/save',
    method: 'post',
    data: data
  })
}

// 查询订单详细
export function getOrder(id) {
  return request({
    url: '/order/' + id,
    method: 'get'
  })
}

// 订单退款
export function orderRefund(query) {
  return request({
    url: '/order/refund',
    method: 'post',
    params: query
  })
}

// 订单返洗
export function orderReback(data) {
  return request({
    url: '/order/reback',
    method: 'post',
    data: data
  })
}


// 为订单部分商品驳回返洗
export function updateStatusByOrderGoodsIds(data) {
  return request({
    url: '/orderSales/updateStatusByOrderGoodsIds',
    method: 'post',
    data: data
  })
}


// 补差价提交
export function updateOrderGoods(data) {
  return request({
    url: '/order/updateOrderGoods',
    method: 'post',
    data: data
  })
}


// 删除订单商品
export function orderGoodsRemove(ids) {
  return request({
    url: '/orderGoods/remove',
    method: 'post',
    data: ids
  })
}
